<?php
namespace app\api\controller;

use think\Controller;
use think\Db;
class Index extends Base
{


    public function index()
    {
        /* $c=Db::connect()->name('goods')->find();
        *$b=db('goods')->select();
       * db('goods') 等同于 Db::connect()->name('goods') 等同于 Db::name('goods');
       **/
        $id=I("get.id",1,'intval');
        $a=Db::name('goods')->where(['id'=>$id])->find();
        die(json_success('ok',$a));
    }

}
